/**
 * 
 */
package com.swim.natatoriuminfotouser.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;

/**
 * 用户游泳馆信息关联Entity
 * @author 刘军武
 * @version 2021-03-16
 */
@Table(name="t_natatorium_info_to_user", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="user_code", attrName="userCode", label="用户user_code"),
		@Column(name="natatorium_info_id", attrName="natatoriumInfoId", label="游泳馆信息id"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class NatatoriumInfoToUser extends DataEntity<NatatoriumInfoToUser> {
	
	private static final long serialVersionUID = 1L;
	private String userCode;		// 用户user_code
	private String natatoriumInfoId;		// 游泳馆信息id
	
	public NatatoriumInfoToUser() {
		this(null);
	}

	public NatatoriumInfoToUser(String id){
		super(id);
	}
	
	@NotBlank(message="用户id不能为空")
	@Length(min=0, max=64, message="用户id长度不能超过 64 个字符")
	public String getUserCode() {
		return userCode;
	}
	
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	@NotBlank(message="游泳馆信息id不能为空")
	@Length(min=0, max=64, message="游泳馆信息id长度不能超过 64 个字符")
	public String getNatatoriumInfoId() {
		return natatoriumInfoId;
	}

	public void setNatatoriumInfoId(String natatoriumInfoId) {
		this.natatoriumInfoId = natatoriumInfoId;
	}
	
}